home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
Projects
/
Tutorial Material
/
Zone Tutorial
/
Structure Examples
/
5. Struct3
< prev
next >
Wrap
Lisp/Scheme
|
1998-10-26
|
2KB
|
99 lines
; STRUCT3 - structure study (expanded to 4 parts)
(setq sonal (activate-tonality (pentatonic c 6) (blues1 f 6)))
(setq tonal (activate-tonality (dorian c 4) (pentatonic b& 3)))
(setq chords (activate-tonality (c min 7 1 4) (d& maj maj7 1 4)))
(setq solo1 (gen-random-keep 0.45 8 '(1 7) '(= a a a a a = a) '(b c d e)))
(setq solo2 (find-change (vector-to-symbol a g (gen-noise-white 30))))
(setq mel1 '(a b c d)) ; bass
(setq mel2 '(a d b c))
(setq drms1 '(ah h dh ah h h dh i)) ; hi-hat, snare, bass drum
(setq drms2 '(h ch ch ah ah ic h ha)) ; hi-hat, rimshot, bass drum
(setq chd1 '(bcde)) ; keyboard
(setq chd2 '(a cd bde))
; Nigel has been using tick value 96 for 1/4 note.
; Because Nigel often mixes ticks and ratios, the function must take
; both cases into account.
(defun use-nigel-ticks (l)
(let (out)
(dolist (x l)
(if (is-length-symbol x)
(push x out)
(push (* x 5) out)))
(nreverse out)))
(setq rhy1 (use-nigel-ticks (gen-loop '((1 4 2) (5 6 4) (1 6 3)) '(24 24 24 24 48 48))))
(setq rhy2 (use-nigel-ticks (gen-fibonacci 5 '(24 24 48) '(96 24 24 48))))
(setq rhyc (use-nigel-ticks (list (* 24 8)(* 48 8) 192 192 192)))
(setq rhyd (use-nigel-ticks (gen-fibonacci 5 '(24 -24 48) '(24 48 24 96))))
(setq mel1a (fill-template rhy1 mel1))
(setq mel2a (fill-template rhy2 mel2))
(setq drms1a (fill-template rhy1 drms1))
(setq drms2a (fill-template rhy2 drms2))
(setq solo1a (fill-template rhy1 solo1))
(setq solo2a (fill-template rhy2 solo2))
(setq chds1 (fill-template rhyc chd1))
(setq chds2 (fill-template rhyd chd2))
(setq zone1 (list (make-zone rhy1)))
(setq zone2 (list (make-zone rhy2)))
(setq vel1 (fill-template rhy1 '(74 54 84 74 54 54 84 44)))
(setq vel2 (fill-template rhy2 '(64 94 127 84 74 84 64 117)))
(setq zones (append zone1 zone2 zone1))
(setq rhys (append rhy1 rhy2 rhy1))
(setq mels (append mel1a mel2a mel1a))
(setq chs (append chds1 chds2 chds1))
(setq solox (append solo1a solo2a solo1a))
(setq rhyds (append rhyc rhyd rhyc))
(setq drmsx (append drms1a drms2a drms1a))
(setq vels (append vel1 vel2 vel1))
(def-symbol
solo solox
bass mels
pno chs
drums drmsx
)
(def-length
solo rhys
bass rhys
pno rhyds
drums rhys
)
(def-velocity
drums vels
)
(def-zone
solo zones
bass zones
pno zones
drums zones
)
(def-tonality
solo sonal
bass tonal
pno chords
drums mt-32
)
(compile-instrument-p "ccl;output:" "quartet"
solo
bass
pno
drums
)